#pragma once

#include <xtd/type_traits.h>

namespace img {

template <class T> class BGRA;
template <class T> class BGR;
template <class T> class RGBA;
template <class T> class ARGB;

} //namespace img

namespace xtd {

#define DEFINE_COLOR_TYPE_TRAITS(COLOR) \
template <typename T> \
struct type_traits< COLOR<T> > { \
private: \
	typedef type_traits<T> element_type_traits; \
public: \
	typedef COLOR<typename element_type_traits::accumulator_type> accumulator_type; \
	typedef COLOR<typename element_type_traits::real_type> real_type; \
	typedef T element_type; \
};

DEFINE_COLOR_TYPE_TRAITS(img::BGRA)
DEFINE_COLOR_TYPE_TRAITS(img::BGR)
DEFINE_COLOR_TYPE_TRAITS(img::RGBA)
DEFINE_COLOR_TYPE_TRAITS(img::ARGB)

#undef DEFINE_COLOR_TYPE_TRAITS

} //namespace xtd

